#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time : 2022-2-25 15:43
# @Author : huabao.tan
# @File : creat.py
# @Software: PyCharm
from tool.allFunction.Function import *
from tool.excel.excel_tool import *
from work.t6.config import *



class CreatTas(CreatExcel):
    def __init__(self):
        super(CreatTas, self).__init__()
        self.f = Context()

    def fun(self, conner, testee):
        '''
        :param conner: 测评者 (整型)
        :param testee: 被测评者 (整型)
        :return:
        '''
        a = 0
        #遍历表头写进Excel
        for b in LIST:
            a += 1
            self.sheet_row_col_value(0, 1, a, b)
        i = 1
        index = 0
        while index < int(conner):
            thisName = self.f.creat_female_name
            i += 1
            index += 1
            col = 0
            list1 = [email(thisName), thisName, '是', email(thisName), thisName, '自评', generate_phone()]
            for q in list1:
                col += 1
                self.sheet_row_col_value(0, i, col, q)
            j = 0
            while j < testee:
                i += 1
                j += 1
                col2 = 0
                otherName = self.f.creat_female_name
                list3 = [email(thisName), thisName, '否', email(otherName), otherName, assess(), generate_phone()]
                for o in list3:
                    col2 += 1
                    self.sheet_row_col_value(0, i, col2, o)
        self.save_file()


if __name__ == '__main__':
    c = CreatTas()
    c.fun(500, 10)
